﻿using Basic.FlowRemoteModel.FlowAppForm;
using Basic.FlowRemoteModel.NodeFormData.Model;
using Basic.FlowService.Interface;
using WeDonekRpc.Client.Interface;

namespace Basic.FlowService.RpcEvent
{
    internal class FlowAppFormRelationEvent : IRpcApiService
    {
        private readonly IFlowAppFormRelationService _Service;

        public FlowAppFormRelationEvent ( IFlowAppFormRelationService service )
        {
            this._Service = service;
        }
        public DataRelation[] GetAppFormRelation ( GetAppFormRelation obj )
        {
            return this._Service.Gets(obj.AppId);
        }
        public void SetAppFormRelation ( SetAppFormRelation obj )
        {
            this._Service.Sync(obj.AppId, obj.Relation);
        }
    }
}
